﻿<Page x:Class="ControlDemos.SpinControlPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:p="clr-namespace:PropertyTools.Wpf;assembly=PropertyTools.Wpf" mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300" Title="FilePicker Demo">

    <StackPanel Width="120" VerticalAlignment="Center">
        <p:SpinControl Value="{Binding DoubleValue}" Margin="4">
            <TextBox Text="{Binding DoubleValue, StringFormat={}{0:0.00}}" BorderThickness="0" HorizontalContentAlignment="Right"/>
        </p:SpinControl>
        <p:SpinControl Value="{Binding IntValue}" Margin="4" Height="32">
            <TextBox Text="{Binding IntValue}" BorderThickness="0" HorizontalContentAlignment="Right"/>
        </p:SpinControl>
        <p:SpinControl Value="{Binding DateValue}" Minimum="{Binding MinimumDate}" Maximum="{Binding MaximumDate}" Margin="4">
            <TextBox Text="{Binding DateValue, StringFormat={}{0:yyyy-MM-dd}}" BorderThickness="0" HorizontalContentAlignment="Center"/>
        </p:SpinControl>
        <p:SpinControl Value="{Binding DateValue}" Minimum="{Binding MinimumDate}" Maximum="{Binding MaximumDate}" SmallChange="{Binding HalfHourInterval}" LargeChange="{Binding HourInterval}" Margin="4">
            <TextBox Text="{Binding DateValue, StringFormat={}{0:HH:mm:ss}}" BorderThickness="0" HorizontalContentAlignment="Center"/>
        </p:SpinControl>
        <p:SpinControl Value="{Binding DoubleValue}" IsEnabled="False" Margin="4">
            <TextBox Text="{Binding DoubleValue, StringFormat={}{0:0.00}}" BorderThickness="0" HorizontalContentAlignment="Right"/>
        </p:SpinControl>
    </StackPanel>

</Page>
